#include <stdio.h>
#include <stdlib.h>
//shows issues with rounding conversions between int and double

main(int argc, char *argv[])
{
    double value;

    int i;

	printf("hardcoded values");

	printf("\nDouble value: 3.05");
	value = 3.05;
	i = value*100;
    printf("double: %lf\n", value);
    printf("int: %d\n", i);

	printf("\nDouble value: 3.06");
	value = 3.06;
	i = value*100;
    printf("double: %lf\n", value);
    printf("int: %d\n", i);

	printf("\nDouble value: 3.07");
	value = 3.07;
	i = value*100;
    printf("double: %lf\n", value);
    printf("int: %d\n", i);

printf("\ntry inputing these values");	

    printf("\nEnter double: ");
    scanf("%lf", &value);
    i = value*100;
    printf("double: %lf\n", value);
    printf("int: %d\n", i);

	printf("\nEnter double: ");
    scanf("%lf", &value);
    i = value*100;
    printf("double: %lf\n", value);
    printf("int: %d\n", i);

	printf("\nEnter double: ");
    scanf("%lf", &value);
    i = value*100;
    printf("double: %lf\n", value);
    printf("int: %d\n", i);

 	


  system("PAUSE");  
}
